package com.dcc.inventory.utils;

public class AuthUtils {

    public static String auth(){
        String randStr = "";
        String auth = "";
        // 生成16位随机数，并将每位数字按照顺序拼接成一个字符串
        for(var i=0;i<16;i++){
            randStr += Math.floor(Math.random()*10);
        }
        String token1 = Md5Utils.MD5(randStr);
        String token2 = Md5Utils.MD5Lower(randStr);
        auth = token1 +"."+token2;
        return  auth;
    }

    public static Long  time(){
        long currentTimestamp = System.currentTimeMillis();
        Long create_time = currentTimestamp;
        return create_time;
    }

}
